
<html>
<head>

<title>X-man</title>

<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/tabber.js"></script>
<link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/project_setting.css" TYPE="text/css" MEDIA="screen">



<link type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/jquery.ui.datetimepicker.css" rel="Stylesheet" />	
<link type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/jquery-ui-1.7.3.custom.css" rel="Stylesheet" />	

<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery-ui-1.7.3.custom.min.js"></script>




<script type="text/javascript">

jQuery(function() {

		var dates = jQuery( ".from, .to" ).datepicker({

			defaultDate: "+1w",

			stepHour: 1,
			stepMinute: 15,
			
			changeMonth: true,
			showAnim: 'slideDown',
			duration: 'fast',
			numberOfMonths: 1,
			showOn: 'both',
			buttonImageOnly: true,
			buttonText:'Select date',
			buttonImage: "<?php echo Html::imageUrl("icon_calendar.gif");?>",			
			
		});
	});

/* Optional: Temporarily hide the "tabber" class so it does not "flash"
   on the page as plain HTML. After tabber runs, the class is changed
   to "tabberlive" and it will appear. */

document.write('<style type="text/css">.tabber{display:none;}<\/style>');
</script>

</head>
<body>

<h1>Project: <?php echo CHtml::encode($model->project_name)?></h1>


<div class="tabber">

     <div class="tabbertab">
	  <h2>Thông Tin Tổng quan</h2>
	  
		<div class ="info1">
		<?php $form=$this->beginWidget(
						'CActiveForm',array(
							'id'=>'editIndex-form',
		  					'enableAjaxValidation'=>false,
							)
		);?>	
				
			<table >
		 		<tr><th>Mã Dự Án</th>
				
				<td><div id="textfield">  <?php echo $form->textField($model,'project_code',array('size'=>50,'maxlength'=>50,'value'=>$model->project_code)); ?></div> 
							<div class="formError"><?php echo $form->error($model,'project_code');?></div>
				</td></tr>
		 		
				<tr><th>Tên Dự Án</th>
				<td><?php echo $form->textField($model,'project_name',array('size'=>50,'maxlength'=>100,'value'=>$model->project_name)); ?></div> 
				<div class="formError"><?php echo $form->error($model,'project_name');?></div>
				</td></tr>
		 
		 	</table> 
					<div id ="submitForm">
					<?php 
						echo CHtml::submitButton('Save');
					?>
						or  <?php echo CHtml::link('Cancel',$backToIndex);?>
					
					
					</div>
		<?php $this->endWidget();?>
		</div>
     </div>


     <div class="tabbertab">
	  <h2>Thông Tin Chi Tiết</h2>
	  
		<div class = "info2">
		<?php $DetailForm= $this->beginWidget(
			'CActiveForm', array(
				'id'=>'editDetail-form',
		 		'enableAjaxValidation'=>false,
				'htmlOptions'=>array(
                		  		'enctype'=>"multipart/form-data",
                		 		 )
		
		)
		);?>
			<table >
		 		<tr><th>Mã Dự Án</th><td>
					<div id="textfield"> 
					<?php echo $DetailForm->textField($model,'project_code',array('value'=>$model->project_code)); ?>
                    </div>
                    <div class="formError"><?php echo $form->error($model,'project_code');?></div>
					</td></tr>
		 		<tr><th>Tên Dự Án</th><td>
					<div id="textfield">
					<?php echo $DetailForm->textField($model,'project_name',array('value'=>$model->project_name));?>
					</div>
					<div class="formError"><?php echo $form->error($model,'project_name');?></div>
					</td></tr>
				<tr><th>Tên Đối Tác</th><td>
					<div id="textfield"> 
					<?php echo $DetailForm->textField($model,'project_partner',array('value'=>$model->project_partner));?>
					<div class="formError"><?php echo $form->error($model,'project_partner');?></div>
					</div>
					</td></tr>
		 		<tr><th>Mô Tả Dự Án</th><td>
								<div id="textfield">
                       		     <?php echo $DetailForm->textArea($model,
                       		     		'project_description',array('value'=>$model->project_description,
                       		     									 'rows'=>4,'cols'=>70,'maxlength'=>500));?>                   		        
                   		        <div class="formError"><?php echo $form->error($model,'project_description');?></div>
                   		        </div>
								</td></tr>
				<tr><th>Ngôn Ngữ Lập Trình</th><td>
								<div id="textfield">
                           		     <?php 
                           		    // can viet 1 phuong thuc : get toan bo cac programming ra 
                           		   echo $DetailForm->dropDownList($model,'project_programming_language_id',$data,array('selected'=> $model->project_programming_language_id));
                           		   ?>
                       		    </div> 
                       		    <div class="formError"><?php echo $form->error($model,'project_prgramming_language_id');?></div>     
							</td></tr>
				<tr><th>Ảnh Đại Diện</th><td>
						  <div id="duongdan">
						    <?php echo Html::image($model->project_logo,"project logo",array('width'=>100));?>
						    
									<?php  echo $DetailForm->fileField($model, "image",array('value'=> $model->project_logo)); ?>
									<?php  echo $DetailForm->error($model,"image");?>
								
                             </div> 
						</td></tr>
				<tr><th>Người Quản Lý</th><td>
							 <div id="textfield">
                       		         <?php 
                       		      echo $DetailForm->dropDownList($model,'project_manager_id',$memberList,array('selected'=> $model->project_manager_id)); 
                       		         ?>
                   		       </div>
                   		       <div class="formError"><?php echo $form->error($model,'project_manager_id');?></div>
							</td></tr>
		 		<tr><th>Thời Gian Thực Hiện</th><td>
						 <div id="tndn"><div class = "demo">
						 	Từ ngày: <?php echo $DetailForm->textField($model,'project_start_date',
																	array('value'=>$model->getStartDate(),
								 				 					 'class'=>'from'));?> 
						    - Đến Ngày:<?php echo $DetailForm->textField($model,'project_end_date',
																	array('value'=>$model->getEndDate(),
																	 'class'=>'to'));?></div>
                                   
                                 </div> 
						</td></tr>
				<tr><th>Nhân Công</th><td>
							<?php echo $DetailForm->textField($model,
							'project_labor',array('value'=>$model->project_labor));?> người
							<div class="formError"><?php echo $form->error($model,'project_labor');?></div>
							</td></tr>
				<tr><th>Giá Thành</th><td>
						 <div id="textfield"> 
						<?php echo $DetailForm->textField($model,'project_cost',array('value'=>$model->project_cost))?>
 						<?php echo $DetailForm->dropDownlist($model,'project_currency',$currency,array('selected'=>$model->project_currency))?>
						</div> 
						<div class="formError"><?php echo $form->error($model,'project_cost');?></div>
						</td></tr>
				<tr><th>Phân Loại Dự Án</th><td>
								<?php echo $DetailForm->dropDownList($model,'project_category_id',
								 $ProjectCategory,array('selected'=>$model->project_category_id));
								?>
										
								</td></tr>
				<tr><th>Tiến Độ Dự Án</th><td>
							 <?php 
							  for($i=0;$i<=100;$i=$i+10){
							  	$selectProgress[$i]= $i.'%';
							  }?>
							  <?php echo $DetailForm->dropDownList($model,'project_progress',$selectProgress,array('selected'=>$model->project_progress));?>
							</td></tr>
							<div class="formError"><?php echo $form->error($model,'project_progress');?></div>
				<tr><th>Đánh Giá Dự Án</th><td>
						<div id="textfield">
                                       
                           <?php echo $DetailForm->textArea($model,'project_rating',
                            array('value'=>$model->project_rating,
                            	  'rows'=>4,'cols'=>70));?>
                                   </div>     
                                
						</td></tr>
				<tr><th>Lợi Nhuận Dự Án</th><td>
						<?php echo $DetailForm->textField($model,'project_profit',array('value'=>$model->project_profit));?>
						<div class="formError"><?php echo $form->error($model,'project_profit');?></div>
						</td></tr>
						
		 	</table> 
				<div id = "submitForm">
				<?php echo CHtml::submitButton('Save');?>
				or  <?php echo CHtml::link('Cancel',$backToIndex);?>
				</div>
			<?php $this->endWidget();?>
		</div>
     </div>



</div>

</body>
</html>
